# -*- coding: utf-8 -*-

from flask.ext.wtf import Form
from wtforms import StringField, PasswordField, IntegerField, BooleanField, SubmitField, RadioField, SelectMultipleField
from wtforms.validators import Required, Length, Email

#教师登录表单
class LoginForm(Form):
    contact = StringField('contact',validators=[Required()])
    password = PasswordField('password')
    rememberme = BooleanField('rememberme')
    submit = SubmitField('logon')
    
class VerifyForm(Form):
    contact = StringField('contact',validators=[Required()])
    password = PasswordField('password')
    verycode = StringField('verycode')
    submit = SubmitField('verify')
    
AVAILABLE_CHOICES = [('1','a'),('2','b'),('3','c'),('4','d'),('5','e'),('6','f')]

class StuCommitForm(Form):
    name = StringField("name",validators=[Required()])
    sex = StringField("sex")
    contact = IntegerField("contact")
    department = StringField("department")
    major = StringField("major",validators=[Required()])
    grade = StringField("grade")
    stuid = StringField("stuid",validators=[Required()])
    #email = StringField("email",validators=[Required(), Email(), Length(min=6,max=40)])
    #password = PasswordField("password",validators=[Required()])
    verycode = StringField("verycode")
    
    content = SelectMultipleField("content", choices=AVAILABLE_CHOICES)
    demands = StringField("demands")
    
    submit = SubmitField("commit_btn")
